import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import api from './api/homeService';

// 导入Font Awesome核心
import { library } from '@fortawesome/fontawesome-svg-core';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { 
  faEye, 
  faEyeSlash, 
  faUser, 
  faLock,
  faHeart,
  faWalking,
  faBed,
  faMobileAlt,
  faNotesMedical,
  faCalendarCheck,
  faSun,
  faClock,
  faMapMarkerAlt,
  faLaptop,
  faUsers,
  faStar,
  faMusic,
  faChess,
  faPaintBrush,
  faHandHoldingHeart,
  faMedal,
  faHandsHelping,
  faUserFriends,
  faChalkboardTeacher,
  faHandHoldingMedical,
  faExchangeAlt,
  faHome,
  faUtensils,
  faHospital,
  faCalendar,
  faTimes,
  faTrash,
  faPlus,
  faCheckCircle,
  faCalendarTimes,
  faSearch
} from '@fortawesome/free-solid-svg-icons';

// 添加图标到库中
library.add(
  faEye, 
  faEyeSlash, 
  faUser, 
  faLock,
  faHeart,
  faWalking,
  faBed,
  faMobileAlt,
  faNotesMedical,
  faCalendarCheck,
  faSun,
  faClock,
  faMapMarkerAlt,
  faLaptop,
  faUsers,
  faStar,
  faMusic,
  faChess,
  faPaintBrush,
  faHandHoldingHeart,
  faMedal,
  faHandsHelping,
  faUserFriends,
  faChalkboardTeacher,
  faHandHoldingMedical,
  faExchangeAlt,
  faHome,
  faUtensils,
  faHospital,
  faCalendar,
  faTimes,
  faTrash,
  faPlus,
  faCheckCircle,
  faCalendarTimes,
  faSearch
);

const app = createApp(App);
app.component('font-awesome-icon', FontAwesomeIcon);
app.config.globalProperties.$api = api;
app.use(router);

app.mount('#app');